<template>
	<view class="cs-card shadow">
		<view v-if="type !== -1" class="header" :class="typeStyle[type]" v-text="typeText[type]">
		</view>
		<view class="body">
			<view class="title">
				{{ title }}
			</view>
			<slot></slot>
		</view>
	</view>
</template>

<script>
	export default {
		name: "CsCard",
		props: {
			title: {
				type: String
			},
			type: {
				// 0正在审核中 1已通过 2已驳回
				type: Number,
				default: -1
			},
		},
		data() {
			return {
				typeText: ['正在审核中','已通过','已驳回'],
				typeStyle: ['warning', 'success','danger']
			};
		},
		computed: {

		}
	}
</script>

<style lang="scss">
	.cs-card {
		border-radius: 8rpx;
		background-color: #fff;
		margin-bottom: 20rpx;

		.header {
			height: 76rpx;
			line-height: 76rpx;
			text-align: center;
			border-radius: 8rpx 8rpx 0 0;
			font-size: 16px;
		}

		.body {
			padding: 20rpx 32rpx;

			.title {
				font-size: 16px;
			}
		}

	}
	.warning {
		background-color: #FFF4EC;
		color: #F4883F;
	}
	.success {
		color: #53BA44;
		background-color: #E9F8E7;
	}
	.danger {
		color: #E43333;
		background-color: #FFE4E4;
	}
</style>
